<?php if(!defined('A')) exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站内容管理系统</title>
<?php
loadcss(array('reset','shell'));

//loadcss(array('colorbox'),P_CSS);
loadjs(array('jquery',),P_JS);

loadjs(array('tab','util','table','ovalidator'));
loadjs(array('ueditor.config'));
loadjs(array('ueditor.all'),UEDITOR_URL);
?>
<script type="text/javascript">
$(document).ready(function(e) {
var smallNowTab;
var pt = new Tabs();
pt.classpre="smalltab_";
pt.container = "smalltab_container";
pt.createTab("t1","添加单页","",true,"n");
pt.init = function(){
	smallNowTab = pt.nowTab;
};
pt.onclick = function(){
	smallNowTab = pt.nowTab;
};		
pt.initTab();
pt.clickNowTab();    
});

$(document).ready(function(){ 
	UE.getEditor('content');
});



$(document).ready(function(){
	oValidator.add([
		{id:'title',name:'标题',error:'不能为空',empty:false},
		{id:'content',name:'正文',error:'不能为空',empty:false}
	]); 	
	$('#myform').submit(function(){
		if(!oValidator.pass()){
			alert(oValidator.error_str('\n'));
			return false;
		}
	});
});

</script>
<style>
body{margin:10px;}
</style>
</head>
<body>
<table class="settop">
<tr>
<td class="settop_left">
&nbsp;&nbsp;
</td>
<td>
<div id="smalltab_container"></div>
</td>
</tr>
</table>
<div class="smalltab_line"></div>
<div id="t1">
<br />
<br />
<form action="<?php echo url('singlepage','add_');?>" method="post" id="myform">
<table width="90%" border="0" cellspacing="0" cellpadding="0" class="mytable">
  <tr>
    <td align="right">标题：</td>
    <td align="left"><input name="title" id="title" class="input" type="text" value="" /><span class="green">(最长为300字符)</span></td>
  </tr>

  <tr>
    <td align="right">正文：</td>
    <td align="left"><textarea name="content" id="content" cols="100" rows="6"></textarea></td>
  </tr>
  
  <tr>
    <td align="right">seo_title：</td>
    <td align="left"><textarea name="seo_title" id="seo_title" cols="100" rows="6"></textarea></td>
  </tr>
  <tr>
    <td align="right">seo_keywords：</td>
    <td align="left"><textarea name="seo_keywords" id="seo_keywords" cols="100" rows="6"></textarea></td>
  </tr>
  <tr>
    <td align="right">seo_description：</td>
    <td align="left"><textarea name="seo_description" id="seo_description" cols="100" rows="6"></textarea></td>
  </tr>
  <tr>
    <td align="right">保存路径：</td>
    <td align="left"><input name="htmlurl" id="htmlurl" class="input" type="text" value="" /></td>
  </tr>
  <tr>
    <td align="right">自定义模板：</td>
    <td align="left">
    <select name="template" id="template">
    <?php echo $this->s_0->my_template('');?>
    </select>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center"><input type="submit" name="submit" value="提交" class="color_btn color_btn_green" /></td>
    </tr>
</table>
</form>
</div>
</body>
</html>